package cn.wufuqi.recyclerviewbindingadapter.itemuibean

import android.view.View

abstract class BaseDragAndDeleteEventBindingAdapterItem: BaseEventBindingAdapterItem() {
    /**
     * 不允许调用
     */
    var mOnPrivate: (() -> Unit)? = null

    /**
     * 获取或拽的view，
     * 如果返回为null，则长按item触发
     * 如果返回不是null，则按下view触发
     */
    open fun getDragView(): View? = null




    /**
     * 删除当前item
     */
    fun delete() {
        mOnPrivate?.invoke()
    }

    override fun destroy() {
        super.destroy()
        mOnPrivate = null
    }
}